package com.ruoyi.oto.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.entity.MemberUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.oto.domain.dto.ReplaceUserDTO;
import com.ruoyi.oto.domain.dto.SetBranchUserDTO;
import com.ruoyi.oto.domain.dto.SetUserDTO;
import com.ruoyi.oto.domain.vo.MemberInfoVO;

/**
 * 会员服务
 *
 * @author ruoyi
 */
public interface MemberUserService extends IService<MemberUser>
{
    /**
     * 通过openId获取用户
     * @param openid
     * @return
     */
    MemberUser getByOpendid(String openid);

    /**
     * 获取会员信息
     * @param member
     * @return
     */
    MemberInfoVO getMemberInfo(MemberUser member);

    /**
     * 设置会员信息
     * @param member
     * @param setUserDTO
     */
    MemberInfoVO setMemberInfo(MemberUser member, SetUserDTO setUserDTO);

    /**
     * 绑定注册码
     * @param member
     * @param regCode
     * @return
     */
    Long bindRegCode(MemberUser member,String regCode);

    /**
     * 设置部门的联企用户
     * @param setBranchUserDTO
     */
    void setBranchUser(SetBranchUserDTO setBranchUserDTO, LoginUser loginUser);

    /**
     * 替换其他类型账号
     * @param replaceUserDTO
     */
    void replaceToOther(ReplaceUserDTO replaceUserDTO);

}
